A Calculus for Compiling and Linking Classes
نویسندگان
چکیده
We describe a low-level calculus, called ink& (pronounced “links”), designed to serve as an intermediate representation in compilers for class-based objectoriented languages. The calculus fills two roles. First, its primitives can express a wide range of class-based object-oriented language features, such as class construction and various forms of method dispatch. Second, it allows the compiler to specify class linking directly in ink& . In particular, the calculus can model the class systems of MOBY [FR99a], OCAML [RV98,Ler98], and LOOM [BFP97], where subclasses may be derived from unknown base classes, or just-in-time linking schemes like that of JAVA [AG98], where an application loads and links classes dynamically.
منابع مشابه
Closed Freyd- and -categories
We give two classes of sound and complete models for the computational-calculus, or c-calculus. For the rst, we generalise the notion of cartesian closed category to that of closed Freyd-category. For the second, we generalise simple indexed categories. The former gives a direct semantics for the computational-calculus. The latter corresponds to an idealisation of stack-based intermediate langu...
متن کاملInferring and Compiling Termination for Constraint Logic Programs
This paper presents an automated method that deals with termination of constraint logic programs in two steps. First, the method infers a set of potentially terminating classes (using approximation techniques and boolean mu-calculus). By \potentially", we mean that for each of these classes, one can nd a static order over the literals of the clauses of the program to ensure termination. Then, g...
متن کاملCompiling Control Knowledge into Preconditions for Planning in the Situation Calculus
A promising technique used in some planning systems to improve their performance is the use of domain dependent search control knowledge. We present a procedure for compiling search control knowledge, expressed declaratively in a logic, into the preconditions of the plan actions (operators). We do this within the framework of the situation calculus by introducing a transformation of nonMarkovia...
متن کاملState transition machines for lambda calculus expressions
The process of compiler generation from lambda-calculus definitions is studied. The compiling schemes developed utilize as their object language the set of state transition machines (STMs): automata-like transition sets using firstorder arguments. An intermediate definition form, the STM-interpreter, is treated as central to the formulation of STMs. Three compiling schemes are presented: one de...
متن کاملFlexible Type-Safe Linking of Components for Java-Like Languages
We define a framework of components based on Java-like languages, where components are binary mixin modules. Basic components can be obtained from a collection of classes by compiling such classes in isolation; for allowing that, requirements in the form of type constraints are associated with each class. Requirements are specified by the user who, however, is assisted by the compiler which can...
متن کامل